package com.gitee.xmhzzz.component.mqtt.client.model;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.util.Map;
import java.util.Objects;

/**
 * @ClassName Resp
 * @Description
 * @Author wzq
 * @Date 2024/1/10 19:15
 * @Version 1.0
 */
@Data
public class Resp {

    public Map<String, Object> headers;

    public Integer code;

    public String message;

    @JSONField(
            serialize = false
    )
    public boolean success() {
        return Objects.equals(200, this.code);
    }

}
